import type { ElementHiderRuleConfig } from '../../../types/constants'
import { ElementSelectorPosition, ElementSelectorType } from '../../../types/constants'
import { ELEMENT_IDENTIFIER_CONFIG } from '../../service/element_identifier/types'

export const ZHI_HU_WEB_ELEMENT_CONFIG: ElementHiderRuleConfig = {
  [ELEMENT_IDENTIFIER_CONFIG.default.header.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: 'header.AppHeader',
    position: ElementSelectorPosition.TopCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.scrollFill.id]: {
    hide: true,
    selectorType: ElementSelectorType.Id,
    selector: '#_scroll-padding-polyfill_',
    position: ElementSelectorPosition.TopCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.loginModal.id]: {
    hide: true,
    selectorType: ElementSelectorType.Complex,
    selector: '.Modal-wrapper:has(.signFlowModal)',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.articleHr.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: 'article hr',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.ad.goodsRecommendCard.id]: {
    hide: false,
    selectorType: ElementSelectorType.Class,
    selector: '.GoodsRecommendCard',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.ad.goodsRecommendAd.id]: {
    hide: false,
    selectorType: ElementSelectorType.Class,
    selector: '.ecommerce-ad-box',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.officialToc.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.Catalog',
    position: ElementSelectorPosition.MiddleLeft,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.rightAside.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.Post-Row-Content-right',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.articleComment.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.Comments-container',
    position: ElementSelectorPosition.BottomCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.recommendRead.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: '.Post-Sub.Post-NormalSub',
    position: ElementSelectorPosition.BottomCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.articleActions.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.ContentItem-actions',
    position: ElementSelectorPosition.BottomCenter,
  },
}
